import request from '@/utils/request';
import axios from 'axios';
import store from '@/store';

export function getToken(token) {
  return request({
    url: '/UserRest/gettoken',
    method: 'post',
    params: { token }
  });
}
// data: {path:''}
export function deleteQnImg(data) {
  return request({
    url: '/UserRest/deleteQnImg',
    method: 'post',
    data
  });
}

export function upload(formData) {
  return axios.post(store.getters.qiniuUploadUrl, formData, { headers: { 'Content-Type': ' multipart/form-data' }});
}
